<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title}-{$Think.lang.web_name}</title>
    {include file="comm/header"/}
</head>
<body>
{include file="comm/left_menu"/}
{include file="comm/top_menu"/}
<div class="container main">
    <div class="col-sm-12 border-bottom text-right"><a class="btn btn-primary mgr-10" href="/power/group_edit/id/{$menu._group_id}"><i class="fa fa-plus"></i>&nbsp;{$Think.lang.group_add}</a></div>
    <div class="col-sm-12">
        <div class="col-sm-12 margin-bottom-10"></div>
        <table class="table table-striped table-bordered table-hover" id="myTable">
            <thead>
            <tr>
                <th>{$Think.lang.group_id}</th>
                <th>{$Think.lang.group_title}</th>
                <th>{$Think.lang.group_status}</th>
                <th>{$Think.lang.handle}</th>
            </tr>
            </thead>

            <tbody>
            {foreach name="group_list" key="key" id="v" index="i"}
            <tr>
                <td style="width: 160px;">{$v.group_id}</td>
                <td>
                    <input type="text" class="input_init" data-field="group_title" data-id="{$v.group_id}" value="{$v.group_title}" data-former="{$v.group_title}">
                </td>
                <td>
                    {if $v.group_status == "0"}{$Think.lang.group_status_0}{/if}
                    {if $v.group_status == "1"}{$Think.lang.group_status_1}{/if}
                </td>
                
                <td style="width: 160px;">
                    <a href="/power/group_edit/id/{$v.group_id}" class="btn btn-primary btn-xs mgr-10"><i class="fa fa-pencil"></i> {$Think.lang.edit}</a>
                    <a href="javascript:del('/power/group_del/id/{$v.group_id}')" class="btn btn-danger btn-xs"><i class="fa fa-times"></i> {$Think.lang.del}</a>
                </td>
            </tr>
            {/foreach}
            </tbody>
        </table>
    </div>
</div>
{include file="comm/footer"/}
<script type="text/javascript">
    $(function () {
        var inputs = $(".input_init");
        inputs.on("blur",function (e) {
            if(this.getAttribute("data-type")==="number"){
                this.setAttribute("type","text");
            }
        });
        inputs.on("focus",function (e) {
            if(this.getAttribute("data-type")==="number"){
                this.setAttribute("type","number");
            }
        });
    });

</script>
</body>
</html>